package com.starnet.studentmanagement.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author sangeng
 * @since 2022-03-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Courses  {


    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 课程号
     */
    @NotNull(message = "课程号不能为空")
    private String cid;

    /***
     * 课程名
     */
    @NotNull(message = "课程名不能为空")
    private String cname;


    /**
     * 任课老师
     */
    @NotNull(message = "教师名不能为空")
    private String teacher;

    /**
     * 学分
     */
    @NotNull(message = "学分不能为空")
    private Double credit;

    /**
     * 及格分
     */
    @NotNull(message = "及格分不能为空")
    @Max(value = 100,message = "及格分不能大于100")
    @Min(value =0,message = "及格分不能小于0")
    private Double passMark;


}
